﻿using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.Json.Serialization;

namespace WcMatch.Models
{
    public class University
    {
        [JsonIgnore]
        public string? UName { get; set; }

        [JsonIgnore]
        public string? Pwd { get; set; }

        //学校唯一识别号
        public string? UniversityId { get; set; }    

        //用户角色
        public int? Role { get; set; }

        [Key]        
        public string Uid { get; set; }

        //public string? Token { get; set; }

        public University() {
            Uid = Guid.NewGuid().ToString();
        }

        public University(string uname, string pwd, int role)
        {
            UName = uname;
            Pwd = pwd;
            Role = role;
            Uid = Guid.NewGuid().ToString();
        }
    }
}
